import service from "@/utils/request";

export function getVideoListService(params) {
  return service({
    url: "/video/list",
    method: "get",
    params,
  });
}

export function uploadVideoService(data) {
  return service({
    url: "/video/upload",
    method: "post", // 使用 POST 方法
    data,
    headers: {
      'Content-Type': 'multipart/form-data', // 设置为 multipart/form-data
    },
  });
}

export function delVideoService(videoId) {
  return service({
    url: "/video/delete",
    method: "delete", // 使用 DELETE 方法
    params: { videoId },
  });
}
export function reNameService(params={}) {
  return service({
    url: "/video/reName",
    method: "put", // 使用 POST 方法
    data: params,
  });
}

export function getVideoService(videoId) {
  return service({
    url: "/video/get",
    method: "get",
    params: { videoId },
  });
}
// export function PlayBackService(videoId) {
//   return service({
//     url: "/video/video-stream",  
//     method: "get",
//     params: { videoId },
//   });
// }